<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top" th:fragment="top-panel">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand"><img style="width:200px; margin-top:-5px;" th:src="@{/image/logo.png}"/></a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="">修改密码</a></li>
                <li><a th:href="@{/login}">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<nav class="navbar navbar-inverse navbar-fixed-top" th:fragment="nav-top">
    <input type="hidden" id="contextPath" th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #httpServletRequest.getServerPort()  + #httpServletRequest.getContextPath() + ''} "/>
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">九九网智</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand"><img class="logo_img" th:src="@{/image/logo.png}" /></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="">修改密码</a></li>
                <li th:unless="${session.user == null}" th:object="${session.user}">
                    <a href="#" th:text="*{userName}"></a>
                </li>
                <li><a th:href="@{/toLoginOut}">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<!--分页-->
<div class="div-navigation" th:fragment="div-navigation">
    <nav aria-label="Page navigation">
        <ul class="pagination">
            <li>
                <a  class="pagination-a-pre" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <th:block th:each="i:${#numbers.sequence(1,(total==0)?1:total)}">
                <li th:attr="class=@{(${pageNo}==${i})?'active':''}" ><a class="pagination-a" th:text="${i}">1</a></li>
            </th:block>
            <li>
                <a class="pagination-a-next"  aria-label="Next">
                    <span  aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li class="goto">
                跳转至  <input type="text" name="page" id="page" value="" th:attr="data-max-page=${total}" class="form-control" th:value="${pageNo}"/> 页
                <input type="button" id="btn-gotoPage" class="btn-default" value="跳转"/>
            </li>
        </ul>
    </nav>
</div>

<!--左侧导航 -->
<div class="col-sm-3 col-md-2 sidebar" th:fragment="menu">
    <ul class="nav nav-sidebar">
        <li class='head'>
            <!--<div><img class="head_img" th:src="@{image/head/2.jpg}"/></div>-->
            <!--<div th:unless="${session.userSession == null}" th:object="${session.userSession}">-->
                <!--<div class='name' th:text="*{userName}" style="text-align:center;">刘晓华</div>-->
                <!--<div class='email' th:text="*{email}" style="text-align:center;">niuxiaoh@99onez.com</div>-->
            <!--</div>-->
        </li>
        <li class='pre'><a href="toIndex"><img class="icon" th:src="@{image/icon/home1.png}"/>首页</a></li>
        <li class='pre' shiro:hasAnyRoles="sys_admin"><a href="toBUserManage"><img class="icon" th:src="@{image/icon/or.png}"/>用户管理</a></li>
        <li class='sub'><a href="toBUserManage"><img class="icon" th:src="@{image/icon/idol.png}"/>班级管理</a></li>
        <li class='sub'><a href="toBUserManage">用户管理</a></li>
        <li class='pre'><a href="CTasksList"><img class="icon" th:src="@{image/icon/js.png}" style="margin-top:1px "/>竞赛设置</a></li>
    </ul>
</div>

<!-- 系统菜单 -->
<div class="col-md-2" data-spy="affix" th:fragment="sys-menu">
    <nav>
        <ul class="nav panel-group" id="menubar">
            <li>
                <a data-toggle="collapse" data-parent="#menubar" data-target="#menu1">题库管理</a>
                <ul id="menu1" class="nav panel-collapse collapse in">
                    <li><a href="">预置题库</a></li>
                    <li><a href="">我的题库</a></li>
                </ul>
            </li>
            <li>
                <a data-parent="#menubar" data-toggle="collapse" data-target="#menu2">班级管理</a>
                <ul id="menu2" class="nav panel-collapse collapse in">
                    <li><a th:href="@{/classlist}">学校行政班</a></li>
                    <li><a href="">我的教学班</a></li>
                </ul>
            </li>
            <li>
                <a data-target="#menu3" data-toggle="collapse" data-parent="#menubar">任务管理</a>
                <ul id="menu3" class="nav panel-collapse collapse in">
                    <li><a href="">布置作业</a></li>
                    <li><a href="">我的作业</a></li>
                    <li><a href="">历史作业</a></li>
                </ul>
            </li>
            <li>
                <a data-target="#menu4" data-toggle="collapse" data-parent="#menubar">小工具</a>
                <ul id="menu4" class="nav panel-collapse collapse in">
                    <li><a th:href="@{/tax/personal}">个人所得税</a></li>
                </ul>
            </li>
        </ul>
    </nav>
</div>

</body>
</html>